﻿using System;
using MessageSystem.Managed.Rpc;

namespace MessageSystem.Managed.LuaRpc
{
    class LuaProxy:RpcProxy
    {
        public LuaProxy(RpcDomain domain, int sessionid, RpcBroadCaster caster,RpcSessionService session)
            : base(domain, sessionid,caster,session)
        {
        }

        public void Call(string json, int nMessageId)
        {
            LuaMessage request = new LuaMessage();
            request.Json = json;
            request.MessageId = nMessageId;
            Invoke(request, false, null);
        }

        public void Call(string json, int nMessageId,object callback)
        {
            LuaMessage request = new LuaMessage();
            request.Json = json;
            request.MessageId = nMessageId;
            Invoke(request, false, callback);
        }
    }
}
